package IC.Semantics.symbols;

import IC.AST.ICClass;
import IC.Semantics.SemanticError;
import IC.Semantics.types.TypeTable;

public class ClassSymbol extends SemanticSymbol
{
	// pointer to the symbol table of this class
	private ClassSymbolTable table;
	
	/**
	 * standard constructor
	 * @param classNode
	 */
	public ClassSymbol(ICClass classNode)  {
		super(classNode.getName(), classNode.getLine(), TypeTable.getClassType(classNode.getName()), SemanticKind.CLASS);
	}
	
	/**
	 * constructor using forward referencing
	 * @param name
	 * @throws SemanticError
	 */
	public ClassSymbol(String name) {
		super(name, 0, null, SemanticKind.CLASS, true);
	}
	
	
	
	public ClassSymbolTable getMatchingTable(){
		return table;
	}
	
	public void setMatchingTable(ClassSymbolTable cst){
		this.table = cst;
	}
}
